<template>
	<div class="view">
		<div class="header">
			<div class="exit" @click="toExit">
				<div class="i-exit i-20 i-mr-10" ></div>
				<div class="exit_str">返回上一页</div>
			</div>
			<div class="h_title">{{title}}</div>
		</div>
	</div>
</template>

<script>
	export default{
		props:{
			url:{
				type:String,
				default:""
			},
			title:{
				type:String,
				default:""
			}
		},
		data(){
			return {
				
			}
		},
		methods:{
			toExit(){
				if(this.url==""){
					this.$router.go(-1)
				}else{
					this.$router.push(this.url)
				}
			},
		}
	}
</script>

<style scoped>
	.header{
		display: flex;
		width: 100%;
		background-color: #fff;
		height: 64px;
		align-items: center;
		justify-content: center;
		position: relative;
		border-bottom: 1px solid #EEEEEE;
	}
	.exit{
		display: flex;
		align-items: center;
		position: absolute;
		left: 40px;
		height: 100%;
		cursor: pointer;
	}
	.exit_str{
		font-size: 16px;
		color: #232842;
		cursor: pointer;
	}
</style>